#ifndef SCENE_H
#define SCENE_H

#include <QObject>
#include <QGraphicsScene>

class Scene:public QGraphicsScene
{
    Q_OBJECT
public:
    Scene(qint32 width = 64000, qint32 height = 64000);

private:
    void init();
    void initPens();
    void initBase();
    void initLayout();

protected:
    void drawBackground(QPainter *painter, const QRectF &rect) override;
    void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override;

private:
    QPen bg_pen;
    qint8 bg_lite_width;
    qint8 bg_bold_width;
    QColor bg_color;
    qint8 grid_width;        // 网格的像素宽度
    qint8 big_grid_columns;  // 每多少个小网格绘制一个大网格
    QGraphicsSimpleTextItem* cursor_pos_txt;
};

#endif // SCENE_H
